home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-19 | 43.7 KB | 1,470 lines |
- Newsgroups: comp.sources.misc
- From: tony@ajfcal.UUCP (Tony Field)
- subject: v12i108: psf2.0 source 5/6
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 12, Issue 108
- Submitted-by: tony@ajfcal.UUCP (Tony Field)
- Archive-name: psf2/part05
-
- psf2.0 source 5/6
- =================
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 5 (of 6)."
- # Contents: Readme.Unix psf.1 psf.doc
- # Wrapped by ajf@trifid on Tue May 15 01:10:52 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Readme.Unix' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Readme.Unix'\"
- else
- echo shar: Extracting \"'Readme.Unix'\" \(11353 characters\)
- sed "s/^X//" >'Readme.Unix' <<'END_OF_FILE'
- X P S F I N S T A L L A T I O N (AT&T Unix 3.2.2)
- X =================================
- X
- X If you are using Xenix 2.3.x, you should be reading the file
- X
- X Readme.Xenix
- X
- X If yow wish to do a manual installation, read the file:
- X
- X Readme.Install
- X
- X The installation script "Install.unix" and Makefile are correctly
- X configured install psf correctly on AT&T Unix 3.2.2 (System V/386) by
- X default. The script builds a printer model, updates the model
- X directory, and (optionally) adds a printer definition to the FACE
- X printer database.
- X
- X The psf scripts and binaries (by default) are placed in
- X /usr/local/bin. If this directory does not exist, it should be
- X created. If you wish to use a different directory for the psf
- X binaries and scripts, edit the Makefile to reflect the desired
- X BINDIR.
- X
- X Now build the binaries with "make all".
- X
- X If your printer is not specified in the ./defs/*.def files (i.e. when
- X you run your install process and the "list of available printers"
- X does not specify your particular printer), then select the nearest
- X approximation or read the "Readme.Install" file (in particular, point
- X 4) to help you set up a printer definition for your printer.
- X
- X If you are using a serial printer, examine the "stty" command to set
- X port characteristics in psfunix.LP (which is the prototype for the
- X printer model "psf")
- X
- X Iff FACE is installed (AT&T Unix 3.2.2), the installation script
- X "Install.unix" can add a printer description into the printer
- X database file to describe a postscript printer. The data base
- X file is:
- X /usr/vmsys/admin/PS/PORTSET/database
- X
- X If you DO wish to have this file update, use the -f option on the
- X Install.unix script. This allows the use FACE for most of the printer
- X installation.
- X
- X Without the -f option, the database is not updated.
- X
- X AT&T Unix users will also have to use lpadmin to select the
- X postscript printer model (FACE does not allow selection of
- X the printer model).
- X
- X
- X PSF is installed (as root) with the command:
- X
- X # Install.unix [-f]
- X
- X where: -f = add Postscript-PSF printer type to the FACE database
- X (AT&T Unix 3.2.2 only) This should NOT be specified
- X if lpadmin is to be used for printer installation.
- X
- X
- X
- X1. SELECT PRINTER TYPE
- X^^^^^^^^^^^^^^^^^^^^^^
- X Root priviliges are probably necessary to allow the creation of
- X various files. The installation options are presented:
- X
- X 1. Select printer type, make printer model files
- X 2. Move psf binaries and scripts to $BINDIR
- X 3. Move psf files to $SPOOLDIR
- X 4. Install man pages in $MANDIR
- X 5. Print man pages
- X 6. Remove psf software and files from binary and spool directories
- X
- X ===> Select an option or enter q to quit: 1
- X
- X First select option 1: to select the postscript printer. After
- X configuration, the various psf files remain in the current directory
- X and are NOT copied to any of the binary or spooling files.
- X
- X The printer type list is presented as follows:
- X
- X SELECT PRINTER TYPE
- X
- X 1: Apple LaserWriter v23.0 2: Apple LaserWriter Plus v38.0
- X 3: Apple LaserWriter Plus v42.2 4: AST TurboLaser/PS v47.0
- X 5: Agfa-Compugraphic 9400P v49.3 6: Dataproducts LZR-2665 v47.0
- X 7: Dataproducts LZR 1260 v47.0 8: IBM 4216-020 v47.0
- X 9: IBM 4216-030 v50.5 10: Linotronic 100 v38.0
- X11: Linotronic 100 v42.5 12: Linotronic 200 v47.1
- X13: Linotronic 200 v49.3 14: Linotronic 300 v47.0
- X15: Linotronic 300 v47.1 16: Linotronic 300 v49.3
- X17: Linotronic 500 v49.3 18: Apple LaserWriter II NT v47.0
- X19: Apple LaserWriter II NTX v47.0 20: NEC LC-890 v47.0 (corrected)
- X21: NEC LC-890 v47.0 22: QMS-PS 810 v47.0
- X23: QMS-PS 800 v46.1 24: QMS-PS 800 Plus v46.1
- X25: QMS ColorScript 100 v49.3 26: Qume ScripTEN v47.0
- X27: Schlumberger 5232 Color PostScript Printer v50.3
- X28: TI OmniLaser 2108 v45.0 29: TI Omnilaser 2115 v47.0
- X30: Varityper 4200B-P v49.3 31: Varityper 4300P v49.3
- X32: Varityper VT-600P v48.0 33: Varityper VT-600W v48.0
- X==> Select printer by number (q = quit, r = refresh display):
- X
- X After the printer type is selected, you are asked to specify the
- X default paper size that psf will assume unless otherwise instructed:
- X
- X Select default page size:
- X 1: Letter
- X 2: Legal
- X 3: A4
- X 4: B5
- X ==> Select page size by number (q = quit, r = refresh display):
- X
- X (The list of page sizes is dependent upon the selected printer type.
- X As a result, the list may differ from the above sample)
- X
- X
- X2. BINARY/SCRIPT INSTALLATION
- X^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- X Install the scripts and binaries in the target directory with option 2:
- X
- X 1. Select printer type, make printer model files
- X 2. Move psf binaries and scripts to $BINDIR
- X 3. Move psf files to $SPOOLDIR
- X 4. Install man pages in $MANDIR
- X 5. Print man pages
- X 6. Remove psf software and files from binary and spool directories
- X
- X ===> Select an option or enter q to quit: 2
- X
- X By default, the destination binary and script directory is
- X /usr/local/bin. Another directory (such as /usr/lbin/bin, etc) may be
- X used. The only requirement is that the various users of PSF are
- X pathed to the specified directory.
- X
- X Install PSF Binaries and
- X scripts in which directory [/usr/local/bin]?
- X
- X The various binaries, scripts and printer defintion files are then
- X copied to the appropriate target directories. LP model and printer
- X scripts are not copied.
- X
- X
- X3. INSTALL LP SPOOLER SCRIPTS
- X^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- X If you intend to use psf as part of the lp back-end spooling system,
- X then install the lp spooler scripts.
- X
- X If you do NOT wish to install the lp back-end, then you may quit the
- X installation process. The psf filters are manually activated (refer
- X to the psf documentation file psf.1 and Readme.Install).
- X
- X If various printer spooling directories and files are correctly set
- X up, the psf model and interface files may be installed in the spool
- X directory by selecting option 3:
- X
- X 1. Select printer type, make printer model files
- X 2. Move psf binaries and scripts to $BINDIR
- X 3. Move psf files to $SPOOLDIR
- X 4. Install man pages in $MANDIR
- X 5. Print man pages
- X 6. Remove psf software and files from binary and spool directories
- X
- X ===> Select an option or enter q to quit: 3
- X
- X After the spooler scripts are installed, activate the printer. If you
- X are using AT&T unix 3.2, you will probably use FACE (if installed) or
- X LPADMIN to complete the printer installation.
- X
- X Read the notes in "Configure Printer" below.
- X
- X
- XCONFIGURE PRINTER
- X^^^^^^^^^^^^^^^^^
- X The printer model that must be used to print with psf is
- X automatically created by Install.unix in file:
- X
- X /usr/spool/lp/model/psf
- X
- X Printer installation may be done with either lpadmin or with FACE. If
- X you install the printer with lpadmin, be sure to specify the "-m psf"
- X option to select the psf printer model. E.g.:
- X
- X /usr/lib/lpadmin -p printer -v /dev/lp -m psf -o nobanner
- X
- X If you install with FACE, you should configure the "Postscript-PSF"
- X printer. Subsequently, modify the printer model to "psf" since FACE
- X cannot select a printer model other than "standard". I.e., use
- X lpadmin with a command similar to:
- X
- X /usr/lib/lpadmin -p printer -m psf -o nobanner
- X
- X
- X4. PRINTING MAN PAGES
- X^^^^^^^^^^^^^^^^^^^^^
- X Optionally, you can continue with the installation if the man pages
- X by selecting options 4/5 from:
- X
- X 1. Select printer type, make printer model files
- X 2. Move psf binaries and scripts to $BINDIR
- X 3. Move psf files to $SPOOLDIR
- X 4. Install man pages in $MANDIR
- X 5. Print man pages
- X 6. Remove psf software and files from binary and spool directories
- X
- X ===> Select an option or enter q to quit:
- X
- X If your system has on-line man pages then the man-page installation
- X (option 4) may be used.
- X
- X The man pages may be printed on the postscript printer by selection
- X of option 5. The installation script prints the man-pages from the
- X pre-formatted *.doc files if /usr/man directory cannot be found.
- X
- X
- X
- XAFTER INSTALLATION
- X^^^^^^^^^^^^^^^^^^
- X Edit the file "Testfile" with sed (as below). This file is an example
- X of how escape seqeuences can be imbedded in a text file to allow
- X direct font control within a text editor (See psf.1 for details).
- X
- X The "Testfile" should contain many ^E characters (octal \005). Since
- X mail system may change the ^E character into the text string "005"
- X You will have to edit the testfile and replace all "005" strings with
- X true ctrl-E character.
- X
- X One easy way to correct this is with sed:
- X
- X sed 's@005@<CTRL-E>@g' Testfile > example
- X +------+
- X actually type the CTRL-E character
- X to generate the octal charcter \005
- X
- X After editing, do the following:
- X
- X psf example | lp
- X
- X to see how font control can work in a text file.
- X
- XLP (spooler) OPTIONS
- X^^^^^^^^^^^^^^^^^^^^
- X The provided printer model (/usr/spool/lp/model/psf and it's
- X associated prototype file psfunix.LP) allows the use of the "-o" to
- X pass options to psf. Two additional banner page options may be passed
- X to the printer script:
- X
- X banner = print banner page
- X nobanner = do not print banner page
- X
- X For example:
- X
- X lp -o"nobanner -4xh" my.text.file
- X lp -o"banner" another.file
- X
- X The psf printer model examines the printer configuration file in:
- X
- X /usr/spool/lp/admins/lp/printers/<printer name>/configuration
- X
- X to determine if banners are required. The first line of this script
- X normally contains one of the following (and can be set by lpadmin):
- X
- X Banner: on:Always
- X Banner: on
- X
- X An additional option is recognized (and cannt be set by lpadmin: it
- X must be manually edited into the configuration file):
- X
- X Banner: off
- X
- X "Banner: on:Always" forces banners to be printed, even if the user
- X specified "nobanner".
- X
- X "Banner: on" prints a banner page unless the user specifies "nobanner".
- X If "nobanner" is provided, then the banner is not printed.
- X
- X "Banner: off" will not print the banner page unless the user
- X provides "banner", in which case the banner page is printed.
- X
- X
- XPSF notes.
- X^^^^^^^^^^
- X The printer definitions in ~psf/defs are derived from the Adobe
- X ".ppd" files. These are available from the Adobe file server via
- X email. The programme "table" is used to translate the ".ppd" files
- X into ".def" printer definition files used by psf.
- X
- X If the user's printer is not in the list of available printers, a
- X suitable .def definition must be manually constructed (see file
- X "sample.def" as a guide).
- X
- X
- XPROBLEMS:
- X
- X The adobe .ppd files not not necessarily describe the "true"
- X printable area of the printers. For example, the printable area of a
- X NEC LC890 printer is different than described in the nec_470.ppd
- X file. I do not know which .ppd files are "accurate" or "inaccurate"!
- X See the Readme.Install file (in particular, point 4).
- END_OF_FILE
- if test 11353 -ne `wc -c <'Readme.Unix'`; then
- echo shar: \"'Readme.Unix'\" unpacked with wrong size!
- fi
- # end of 'Readme.Unix'
- fi
- if test -f 'psf.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'psf.1'\"
- else
- echo shar: Extracting \"'psf.1'\" \(14237 characters\)
- sed "s/^X//" >'psf.1' <<'END_OF_FILE'
- X.TH PSF 1 ""
- X.SH NAME
- Xpsf \- postscript filter
- X
- X.SH SYNOPSIS
- X
- X.B psf
- X[
- X.B -1|2|4
- X] [
- X.B -b
- X.I n
- X] [
- X.B -c
- X.I n
- X] [
- X.B -f
- X.I n
- X] [
- X.B -g
- X.I type
- X] [
- X.B -h
- X]
- X [
- X.B -H
- X.I text
- X] [
- X.B -i
- X.I n
- X] [
- X.B -l
- X.I n
- X] [
- X.B -L
- X.I n
- X] [
- X.B -m
- X.I n
- X] [
- X.B -n
- X]
- X [
- X.B -p
- X.I n
- X] [
- X.B -t
- X.I n
- X] [
- X.B -w
- X] [
- X.B -x
- X]
- X.I file... >out.file
- X
- X where -1|2|4 print 1,2 or 4 up on a page (default = 1)
- X -b n select paper bin n
- X -c n print columns (based on Courier font)
- X -d allow double sided printing
- X -f n font number/name (default = 0 = Courier)
- X -g type page type (default = letter)
- X -h put file name as header on each page
- X -H text put text as header on each page
- X -i n indent left margin n points
- X -l n print lines per page
- X -L n page length in lines
- X -m n indent top margin in points
- X -n set portrait (narrow) format
- X -p n set point size to n
- X -t n set tabs to n (default = 8)
- X -w set landscape (wide) format
- X -x draw cross with 4-up page
- X file.. name of files to be printed (or stdin)
- X
- X Fonts selection with -f n (printer dependent)
- X 0 Courier 1 Helvetica
- X 2 Times-Roman 3 AvantGarde-Book
- X 4 Bookman-Light 5 NewCenturySchlbk-Roman
- X 6 Palatino-Roman 7 Helvetical-Narrow
- X 8 Garamond 9 ZapfChancery-MediumItalic
- X.fi
- X
- X.SH DESCRIPTION
- X
- X.B Psf
- Xwill accept text and filter it to print on postscript printers.
- XThe print may be "1-up", "2-up", or "4-up" on a page.
- X.B Psf
- Xis a general purpose filter for
- Xmost text and programme listings. By using various escape
- Xsequences (described below),
- Xany portion of the text may be printed in
- Xdifferent fonts and at different point sizes.
- X
- XIf "letter" sized paper is used, the page is assumed to have 63 lines
- Xand 80 columns wide. For "legal" sized paper, the effective size is
- X81 lines by 80 columns. These dimensions account for the "print region"
- X(excluding margins) of the page.
- X
- XThe actual number of print line and characters per line may
- Xbe over-ridden by specifing suitable options.
- X
- XGeneral text may be printed with a command such as:
- X.nf
- X
- X psf this.file that.fil | lp
- X.fi
- X
- X
- XAdditional "pre-filters" such as
- X.B pnf
- Xand
- X.B pmf
- Xcan be used to
- Xautomatically generate escape sequences to control font and sizes for
- Xprinted documents.
- X
- XIf an
- X.B nroff'ed
- Xdocument is filtered with programme
- X.B pnf
- X, then the
- Xdocument will print properly with bold-face and underlining.
- X
- XFor example, you could print the
- X.B psf
- Xman page "2-up" with:
- X.nf
- X
- X nroff -man psf.1 | pnf -ir 3 | psf -2 | lp
- X.fi
- X
- XRefer to the man-page for
- X.B pnf/psnroff
- Xfor greater detail.
- X
- X.B Pmf
- Xis a very simple mail printing filter. It italicizes the contents of
- Xvarious headers such as 'Subject:'
- Xand attempts to place peoples names in boldface.
- XIt can be used to print entire mail boxes as in:
- X.nf
- X
- X pmf /usr/spool/mail/tony | psf | lp
- X.fi
- X
- XRefer to the man-page for
- X.B pmf/psmbox
- Xfor greater detail.
- X
- X.SH OPTIONS
- X.TP
- X.B \-1\|2\|4
- XSpecify the number of logical pages that are to be printed
- Xon a physical page. By default,
- X.B psf
- Xwill print one logical
- Xpage per physical page. If two logical pages are specified
- Xwith
- X.I -2
- X, then two pages are printed in "landscape" format:
- X
- X.nf
- X +-----------+-----------+
- X | pg 1 | pg 2 |
- X | | |
- X +-----------+-----------+
- X.fi
- X
- XIf four logical pages are specified with
- X.I -4
- X, then the pages
- Xare printed in "portrait format:
- X
- X.nf
- X +-----------+-----------+
- X | pg 1 | pg 3 |
- X | | |
- X +-----------+-----------+
- X | pg 2 | pg 4 |
- X | | |
- X +-----------+-----------+
- X.fi
- X
- XEach logical page printed in 2-up or 4-up format contains the same number
- Xof lines and print columns as if it were printed in 1-up portrait format.
- XThe characters may be compressed or expanded horizontally to fill to the
- Xlogical page width. For example, if you printed with:
- X
- X.nf
- X psf -4 my.text | lp
- X.fi
- X
- Xthen you would have four miniature pages, each of which would
- Xcontain 63 print lines and 80 characters on a line.
- X
- XIf you wish to compensate for the character compression/expansion, then
- Xuse the
- X.I -c
- Xoption to set the print line width.
- X
- XClipping is NOT performed in 2-up and 4-up printing. If the line lengths
- Xon the left half of the page exceed the logical page width, then the
- Xlines will overflow into the right half of the page.
- X
- X.TP
- X.B \-b n
- XSelect paper bin
- X.I n.
- XIf this option is not specified, the
- Xdefault paper bin is used.
- X.B Psf
- Xassumes the paper bin number is valid for your printer.
- X
- X.TP
- X.B \-c n
- XSets the number of print columns on a line. The character width is
- Xbased on the Courier font (10 pitch, character width of 7.2 points).
- XThe text is scaled to print the desired number of characters over
- Xthe entire page width. Setting the character count does NOT alter
- Xthe number of print lines.
- X
- XIf you specified
- X.B -c40
- X, the character
- Xwidth would be horizontally elongated to twice normal.
- X
- XIf you specified
- X.B -c160
- X, the character width would be compressed
- Xto one half normal width.
- X
- X.TP
- X.B \-d
- XPrepare for double sided printing. The resulting print stream
- Xmust be to a file which will subsequently filtered with
- X.B psd.
- X
- XIf the printer is configured with two print trays (such as
- Xa Nec LC890), then the double-sided printing is automatically
- Xperformed. The operator re-inserts the printed "first side" stack of paper
- Xinto the second tray. Printing then continues for the "second side".
- X
- XIf the printer is not configured with two trays, the output from
- Xpsf must be directed to a file (not a pipe). This file must be
- Xprocessed with
- X.B psd
- Xto print double sided. (Refer to the man page
- Xfor
- X.B psd.
- X)
- X
- X.TP
- X.B \-f n
- XAny of the standard postscript
- Xfonts may be selected in lieu
- Xof the default Courier. These are selected from the following
- Xtable:
- X.nf
- X
- X 0 Courier
- X 1 Helvetica
- X 2 Times-Roman
- X 3 AvantGarde-Book
- X 4 Bookman-Light
- X 5 NewCenturySchlbk-Roman
- X 6 Palatino-Roman
- X 7 Helvetica-Narrow
- X 8 Garamond
- X 9 ZapfChancery-MediumItalic
- X.fi
- X
- XYour printer may not have exactly these fonts. To see which
- Xfonts are configured, get the psf usage information with:
- X
- X.nf
- X psf -
- X.fi
- X
- XSince Courier is the only fixed-pitch font, it is usually used for
- Xprinting of man pages or programme listings. The other fonts are
- Xproportionally spaced.
- X
- XThe selected font becomes the new "default font".
- X
- XThe font may be specified either by the font number or the font
- Xname. For example, the Courier font could be selected with either
- Xoption '-f 0' or '-f Courier'. If the selection is by name, then
- Xonly a few of the characters of the name must be provided. The
- XNewCenturySchlbk-Roman font could be selected with the
- Xoption '-f New'.
- X
- X.TP
- X.B \-g type
- XSets the working paper type. The
- X.I type
- Xmay be one of
- Xthe following with the default number of lines and
- Xcolumns (assuming 12 point, 10 pitch characters):
- X
- X.nf
- X type lines columns
- X ------- ----- -------
- X letter 63 80
- X legal 81 80
- X a4 67 80
- X b5 58 65
- X.fi
- X
- XThe number of lines/columns represents the number of possible lines/columns
- Xin the printable region of the postscript printer - exclusive of the
- Xunprintable margin area.
- X
- X.TP
- X.B \-h
- XThe file name, page number and current date will be printed at
- Xthe top of each page. The point size is automatically scaled to
- Xpermit the specified number of text lines to be printed to account
- Xfor the additional two lines consumed by the title line.
- X
- X.TP
- X.B \-H text
- XPlace a header (like
- X.I -h
- X) however use
- X.I text
- Xrather than the filename.
- X
- X.TP
- X.B \-i n
- XIndent the left margin by
- X.I n
- Xpoints. This may be used to center
- Xthe text in the page.
- X
- X.TP
- X.B \-l n
- XSets the number of printed lines per page. The default is 63 lines for
- Xletter sized paper.
- XIf more than 63 lines per page are specified, the point size is
- Xautomatically reduced to accomodate the line count.
- X
- XThe number of printed lines specified by
- X.B -l
- Xmay be less than
- Xthe number of possible print lines specified by
- X.B -L.
- XFor example,
- Xthe default total number of print lines is 63 (as though you
- Xhad specified
- X.B -L63
- X). If you used the option
- X.B -l20
- X, then only
- Xthe first 20 lines of the possible 63 would be printed. A skip
- Xto new page would be performed for the 21st line.
- X
- XIf you are printing text that is wider than the nominal 75-80 columns
- Xin width, then specify more than normal lines per page. Then number
- Xof print columns available will increase with the
- Xnumber of lines.
- X
- X.TP
- X.B \-L n
- XSpecifies the number of lines available on the page.
- XIf
- X.B -L
- Xis
- Xspecified, then the page scale is adjusted to accomodate the
- Xline count. However, only the number of lines specified by the
- X.B -l
- Xoption will print.
- X
- XThe number of lines specified by
- X.B -L
- Xwill be scaled to print
- Xbetween the top and bottom printable area of the page. Normally,
- Xthe letter size page is 792 points high with 32 points unavailable
- Xfor printing. Using 12 point letters, this results in a maximum
- Xof (792-32)/12=63.33 print lines (the 0.33 accounts for the lower case
- Xdecenders and underline).
- XIf you specified
- Xmore than 63 lines per page, then the page is appropriately scaled
- Xto print in smaller point sizes.
- X
- XThe number of lines specified by
- X.B -L
- Xwill
- Xbe scaled to fit within the 760 available vertical points.
- X
- XFor example, if you specified
- X.B -L31
- X, the number of lines on a page
- Xwill set to 31 and the printed characters will be twice normal size.
- XConversely, if you specified
- X.B -L126
- X, then the characters would be
- Xone half normal size.
- X
- X.TP
- X.B \-m n
- XMove the top margin down by
- X.I n
- Xpoints. This may be used to center
- Xthe text in the page.
- X
- X.TP
- X.B \-n
- XThe page is printed in portrait (narrow) format. This is the default
- Xfor 1-up and 4-up printing. If 2-up printing is selected, the page
- Xis printed in landscape format. If portrait layout is desired for
- X2-up printing, then the
- X.B -n
- Xoption must be specified. Landscape
- Xprinting requires the
- X.B -w
- Xwide option to be used.
- X
- X.TP
- X.B \-p n
- XSets the nominal point size to
- X.I n
- Xpoints. This applies only
- Xto "1-up" printing. If "2-up" or "4-up" or "1-up, landscape"
- Xprinting is desired, the nominal point size is automatically scaled.
- X
- XThe selected point size becomes the new "default point size".
- X
- X.TP
- X.B \-t n
- XSets the width of the tab stops. By default this is set to 8.
- XIf the first line of a text file contains the string "ta=", then
- Xthe tab stop width is automatically determined from this string.
- XFor example, if the first text line contains "/* ta=4 */" then
- Xthe tab width is automatically set to 4. This feature is useful
- Xif programme source files use a tab space of 4.
- X
- X.TP
- X.B \-w
- XThe page is printed in landscape (wide, horizontal format).
- XThis is the default for 2-up printing. If 1-up printing is
- Xdesired in landscape mode, then the
- X.B -w
- Xswitch must be specified.
- XPortrait printing requires that the
- X.B -n
- X(narrow) option be used.
- X
- XThe number of lines printed (by default) is the same as would
- Xbe printed in portrait layout. Character point size is automatically
- Xscaled.
- X
- X.TP
- X.B \-x
- XDraws a cross in the to separate the logical pages. This is
- Xeffective for 4-up printing. If 1-up or 2-up printing is used,
- Xthis option is ignored.
- X
- X.SH PSF NOTES
- X
- X.B Psf
- Xfilters text in a "minimally conforming" postscript format (as
- Xspecified in the Postscript Language Reference Manual).
- X
- XIf the text contains escape sequences (possibly generated by
- X.B pnf
- X, another
- Xpre-filter or a text editor), the escape sequences are analyzed to
- Xperform limited font and underline selection. The escape sequences
- Xare translated into appropriate postscript code.
- X
- XThe permitted sequences have the
- Xfollowing format:
- X.nf
- X
- X ^E<command>
- X.fi
- X
- XThe following sequences are recognized:
- X
- X.nf
- X ^EB begin bold (in current font family)
- X ^Eb end bold
- X ^EI begin italics
- X ^Ei end italics
- X ^EU begin underline
- X ^Eu end underline.
- X ^EFn begin font 'n' (0..8)
- X ^Ef revert to default font
- X ^EPnn begin point size 'nn' (2 digits)
- X ^Ep revert to default point size
- X ^E+ skip 1/2 line foreward
- X ^E- skip 1/2 line backward
- X
- X "^E" is a true ctrl-E character, not
- X the ascii text string "^", "E"
- X.fi
- X
- XNote that point sizes with ^EPnn must be two digits such as ^EP07 or ^EP14.
- X
- XSequences may be nested: bold, italic, underlined would be
- Xgenerated with:
- X.nf
- X
- X ^EB^EI^EUbold, italic and underlined^Eu^Ei^Eb
- X.fi
- X
- XThe underline sequence should be 'innermost' to ensure that the
- Xunderline follows the exact font width, correct thickness and
- Xposition.
- X
- XFont numbers are unique to a printer. Font 4 on one printer
- Xmay not be the same as font 4 on a different printer. For a
- Xgiven printer, the font numbers are as specified on the
- Xusage menu of psf (generated with "psf --").
- X
- XAny unrecognized escape sequences are ignored.
- X
- XAny filter that can construct the above escape sequences may be
- Xused to provide input to
- X.B psf.
- XThe provided
- X.B pnf
- Xand
- X.B pmf
- Xare only two simple examples.
- X
- XIf your text editor (such as vi) is able to conveniently insert a ^E
- Xcharacter into text, the above sequences could be inserted
- Xand you would have "almost a word processor." This is a convenient
- Xway to add a bit of class to quick memos.
- X
- X.SH PRINTER SPOOLING
- X
- XIf
- X.B psf
- Xhas been installed as part of the Xenix or AT&T Unix 3.2
- X.B lp
- Xspooling system,
- Xthen
- X.B psf
- Xoptions may be passed in the
- X.B lp
- Xcommand line using the
- X.B -o
- Xoption for
- X.B lp
- X:
- X
- X.nf
- X lp -o"-4xh" this.file that.file
- X --------
- X.fi
- X
- XFor AT&T Unix systems, the additional options of "banner" and "nobanner"
- Xmay be passed to the spooler to print or not print a banner page:
- X
- X.nf
- X lp -o"nobanner -4xh" this.file that.file
- Xor
- X lp -o"banner -4xh" this.file that.file
- X.fi
- X
- X.SH SEE ALSO
- X
- Xpmf pnf psman psnroff psmbox lp lpadmin
- X
- X.SH AUTHOR
- X
- XTony Field. tony@ajfcal
- END_OF_FILE
- if test 14237 -ne `wc -c <'psf.1'`; then
- echo shar: \"'psf.1'\" unpacked with wrong size!
- fi
- # end of 'psf.1'
- fi
- if test -f 'psf.doc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'psf.doc'\"
- else
- echo shar: Extracting \"'psf.doc'\" \(15470 characters\)
- sed "s/^X//" >'psf.doc' <<'END_OF_FILE'
- X
- X
- X
- X PSF(1) UNIX System V PSF(1)
- X
- X
- X
- X NAME
- X psf - postscript filter
- X
- X
- X SYNOPSIS
- X psf [ -1|2|4 ] [ -b n ] [ -c n ] [ -f n ] [ -g type ] [ -h ]
- X [ -H text ] [ -i n ] [ -l n ] [ -L n ] [ -m n ] [ -n ]
- X [ -p n ] [ -t n ] [ -w ] [ -x ] file... >out.file
- X
- X where -1|2|4 print 1,2 or 4 up on a page (default = 1)
- X -b n select paper bin n
- X -c n print columns (based on Courier font)
- X -d allow double sided printing
- X -f n font number/name (default = 0 = Courier)
- X -g type page type (default = letter)
- X -h put file name as header on each page
- X -H text put text as header on each page
- X -i n indent left margin n points
- X -l n print lines per page
- X -L n page length in lines
- X -m n indent top margin in points
- X -n set portrait (narrow) format
- X -p n set point size to n
- X -t n set tabs to n (default = 8)
- X -w set landscape (wide) format
- X -x draw cross with 4-up page
- X file.. name of files to be printed (or stdin)
- X
- X Fonts selection with -f n (printer dependent)
- X 0 Courier 1 Helvetica
- X 2 Times-Roman 3 AvantGarde-Book
- X 4 Bookman-Light 5 NewCenturySchlbk-Roman
- X 6 Palatino-Roman 7 Helvetical-Narrow
- X 8 Garamond 9 ZapfChancery-MediumItalic
- X
- X
- X DESCRIPTION
- X Psf will accept text and filter it to print on postscript
- X printers. The print may be "1-up", "2-up", or "4-up" on a
- X page. Psf is a general purpose filter for most text and
- X programme listings. By using various escape sequences
- X (described below), any portion of the text may be printed in
- X different fonts and at different point sizes.
- X
- X If "letter" sized paper is used, the page is assumed to have
- X 63 lines and 80 columns wide. For "legal" sized paper, the
- X effective size is 81 lines by 80 columns. These dimensions
- X account for the "print region" (excluding margins) of the
- X page.
- X
- X The actual number of print line and characters per line may
- X be over-ridden by specifing suitable options.
- X
- X
- X
- X Page 1 (printed 5/14/90)
- X
- X
- X
- X
- X
- X
- X PSF(1) UNIX System V PSF(1)
- X
- X
- X
- X General text may be printed with a command such as:
- X
- X psf this.file that.fil | lp
- X
- X
- X Additional "pre-filters" such as pnf and pmf can be used to
- X automatically generate escape sequences to control font and
- X sizes for printed documents.
- X
- X If an nroff'ed document is filtered with programme pnf ,
- X then the document will print properly with bold-face and
- X underlining.
- X
- X For example, you could print the psf man page "2-up" with:
- X
- X nroff -man psf.1 | pnf -ir 3 | psf -2 | lp
- X
- X Refer to the man-page for pnf/psnroff for greater detail.
- X
- X Pmf is a very simple mail printing filter. It italicizes
- X the contents of various headers such as 'Subject:' and
- X attempts to place peoples names in boldface. It can be used
- X to print entire mail boxes as in:
- X
- X pmf /usr/spool/mail/tony | psf | lp
- X
- X Refer to the man-page for pmf/psmbox for greater detail.
- X
- X
- X OPTIONS
- X -124 Specify the number of logical pages that are to be
- X printed on a physical page. By default, psf will print
- X one logical page per physical page. If two logical
- X pages are specified with -2 , then two pages are
- X printed in "landscape" format:
- X
- X +-----------+-----------+
- X | pg 1 | pg 2 |
- X | | |
- X +-----------+-----------+
- X
- X If four logical pages are specified with -4 , then the
- X pages are printed in "portrait format:
- X
- X +-----------+-----------+
- X | pg 1 | pg 3 |
- X | | |
- X +-----------+-----------+
- X | pg 2 | pg 4 |
- X | | |
- X +-----------+-----------+
- X
- X
- X
- X
- X Page 2 (printed 5/14/90)
- X
- X
- X
- X
- X
- X
- X PSF(1) UNIX System V PSF(1)
- X
- X
- X
- X Each logical page printed in 2-up or 4-up format
- X contains the same number of lines and print columns as
- X if it were printed in 1-up portrait format. The
- X characters may be compressed or expanded horizontally
- X to fill to the logical page width. For example, if you
- X printed with:
- X
- X psf -4 my.text | lp
- X
- X then you would have four miniature pages, each of which
- X would contain 63 print lines and 80 characters on a
- X line.
- X
- X If you wish to compensate for the character
- X compression/expansion, then use the -c option to set
- X the print line width.
- X
- X Clipping is NOT performed in 2-up and 4-up printing.
- X If the line lengths on the left half of the page exceed
- X the logical page width, then the lines will overflow
- X into the right half of the page.
- X
- X
- X -b n Select paper bin n. If this option is not specified,
- X the default paper bin is used. Psf assumes the paper
- X bin number is valid for your printer.
- X
- X
- X -c n Sets the number of print columns on a line. The
- X character width is based on the Courier font (10 pitch,
- X character width of 7.2 points). The text is scaled to
- X print the desired number of characters over the entire
- X page width. Setting the character count does NOT alter
- X the number of print lines.
- X
- X If you specified -c40 , the character width would be
- X horizontally elongated to twice normal.
- X
- X If you specified -c160 , the character width would be
- X compressed to one half normal width.
- X
- X
- X -d Prepare for double sided printing. The resulting print
- X stream must be to a file which will subsequently
- X filtered with psd.
- X
- X If the printer is configured with two print trays (such
- X as a Nec LC890), then the double-sided printing is
- X automatically performed. The operator re-inserts the
- X printed "first side" stack of paper into the second
- X tray. Printing then continues for the "second side".
- X
- X
- X
- X
- X Page 3 (printed 5/14/90)
- X
- X
- X
- X
- X
- X
- X PSF(1) UNIX System V PSF(1)
- X
- X
- X
- X If the printer is not configured with two trays, the
- X output from psf must be directed to a file (not a
- X pipe). This file must be processed with psd to print
- X double sided. (Refer to the man page for psd. )
- X
- X
- X -f n Any of the standard postscript fonts may be selected in
- X lieu of the default Courier. These are selected from
- X the following table:
- X
- X 0 Courier
- X 1 Helvetica
- X 2 Times-Roman
- X 3 AvantGarde-Book
- X 4 Bookman-Light
- X 5 NewCenturySchlbk-Roman
- X 6 Palatino-Roman
- X 7 Helvetica-Narrow
- X 8 Garamond
- X 9 ZapfChancery-MediumItalic
- X
- X Your printer may not have exactly these fonts. To see
- X which fonts are configured, get the psf usage
- X information with:
- X
- X psf -
- X
- X Since Courier is the only fixed-pitch font, it is
- X usually used for printing of man pages or programme
- X listings. The other fonts are proportionally spaced.
- X
- X The selected font becomes the new "default font".
- X
- X The font may be specified either by the font number or
- X the font name. For example, the Courier font could be
- X selected with either option '-f 0' or '-f Courier'. If
- X the selection is by name, then only a few of the
- X characters of the name must be provided. The
- X NewCenturySchlbk-Roman font could be selected with the
- X option '-f New'.
- X
- X
- X -g type
- X Sets the working paper type. The type may be one of
- X the following with the default number of lines and
- X columns (assuming 12 point, 10 pitch characters):
- X
- X type lines columns
- X ------- ----- -------
- X letter 63 80
- X legal 81 80
- X a4 67 80
- X
- X
- X
- X Page 4 (printed 5/14/90)
- X
- X
- X
- X
- X
- X
- X PSF(1) UNIX System V PSF(1)
- X
- X
- X
- X b5 58 65
- X
- X The number of lines/columns represents the number of
- X possible lines/columns in the printable region of the
- X postscript printer - exclusive of the unprintable
- X margin area.
- X
- X
- X -h The file name, page number and current date will be
- X printed at the top of each page. The point size is
- X automatically scaled to permit the specified number of
- X text lines to be printed to account for the additional
- X two lines consumed by the title line.
- X
- X
- X -H text
- X Place a header (like -h ) however use text rather than
- X the filename.
- X
- X
- X -i n Indent the left margin by n points. This may be used to
- X center the text in the page.
- X
- X
- X -l n Sets the number of printed lines per page. The default
- X is 63 lines for letter sized paper. If more than 63
- X lines per page are specified, the point size is
- X automatically reduced to accomodate the line count.
- X
- X The number of printed lines specified by -l may be less
- X than the number of possible print lines specified by -
- X L. For example, the default total number of print lines
- X is 63 (as though you had specified -L63 ). If you used
- X the option -l20 , then only the first 20 lines of the
- X possible 63 would be printed. A skip to new page would
- X be performed for the 21st line.
- X
- X If you are printing text that is wider than the nominal
- X 75-80 columns in width, then specify more than normal
- X lines per page. Then number of print columns available
- X will increase with the number of lines.
- X
- X
- X -L n Specifies the number of lines available on the page.
- X If -L is specified, then the page scale is adjusted to
- X accomodate the line count. However, only the number of
- X lines specified by the -l option will print.
- X
- X The number of lines specified by -L will be scaled to
- X print between the top and bottom printable area of the
- X page. Normally, the letter size page is 792 points
- X high with 32 points unavailable for printing. Using 12
- X
- X
- X
- X Page 5 (printed 5/14/90)
- X
- X
- X
- X
- X
- X
- X PSF(1) UNIX System V PSF(1)
- X
- X
- X
- X point letters, this results in a maximum of (792-
- X 32)/12=63.33 print lines (the 0.33 accounts for the
- X lower case decenders and underline). If you specified
- X more than 63 lines per page, then the page is
- X appropriately scaled to print in smaller point sizes.
- X
- X The number of lines specified by -L will be scaled to
- X fit within the 760 available vertical points.
- X
- X For example, if you specified -L31 , the number of
- X lines on a page will set to 31 and the printed
- X characters will be twice normal size. Conversely, if
- X you specified -L126 , then the characters would be one
- X half normal size.
- X
- X
- X -m n Move the top margin down by n points. This may be used
- X to center the text in the page.
- X
- X
- X -n The page is printed in portrait (narrow) format. This
- X is the default for 1-up and 4-up printing. If 2-up
- X printing is selected, the page is printed in landscape
- X format. If portrait layout is desired for 2-up
- X printing, then the -n option must be specified.
- X Landscape printing requires the -w wide option to be
- X used.
- X
- X
- X -p n Sets the nominal point size to n points. This applies
- X only to "1-up" printing. If "2-up" or "4-up" or "1-up,
- X landscape" printing is desired, the nominal point size
- X is automatically scaled.
- X
- X The selected point size becomes the new "default point
- X size".
- X
- X
- X -t n Sets the width of the tab stops. By default this is
- X set to 8. If the first line of a text file contains
- X the string "ta=", then the tab stop width is
- X automatically determined from this string. For
- X example, if the first text line contains "/* ta=4 */"
- X then the tab width is automatically set to 4. This
- X feature is useful if programme source files use a tab
- X space of 4.
- X
- X
- X -w The page is printed in landscape (wide, horizontal
- X format). This is the default for 2-up printing. If
- X 1-up printing is desired in landscape mode, then the -w
- X switch must be specified. Portrait printing requires
- X
- X
- X
- X Page 6 (printed 5/14/90)
- X
- X
- X
- X
- X
- X
- X PSF(1) UNIX System V PSF(1)
- X
- X
- X
- X that the -n (narrow) option be used.
- X
- X The number of lines printed (by default) is the same as
- X would be printed in portrait layout. Character point
- X size is automatically scaled.
- X
- X
- X -x Draws a cross in the to separate the logical pages.
- X This is effective for 4-up printing. If 1-up or 2-up
- X printing is used, this option is ignored.
- X
- X
- X PSF NOTES
- X Psf filters text in a "minimally conforming" postscript
- X format (as specified in the Postscript Language Reference
- X Manual).
- X
- X If the text contains escape sequences (possibly generated by
- X pnf , another pre-filter or a text editor), the escape
- X sequences are analyzed to perform limited font and underline
- X selection. The escape sequences are translated into
- X appropriate postscript code.
- X
- X The permitted sequences have the following format:
- X
- X ^E<command>
- X
- X The following sequences are recognized:
- X
- X ^EB begin bold (in current font family)
- X ^Eb end bold
- X ^EI begin italics
- X ^Ei end italics
- X ^EU begin underline
- X ^Eu end underline.
- X ^EFn begin font 'n' (0..8)
- X ^Ef revert to default font
- X ^EPnn begin point size 'nn' (2 digits)
- X ^Ep revert to default point size
- X ^E+ skip 1/2 line foreward
- X ^E- skip 1/2 line backward
- X
- X "^E" is a true ctrl-E character, not
- X the ascii text string "^", "E"
- X
- X Note that point sizes with ^EPnn must be two digits such as
- X ^EP07 or ^EP14.
- X
- X Sequences may be nested: bold, italic, underlined would be
- X generated with:
- X
- X ^EB^EI^EUbold, italic and underlined^Eu^Ei^Eb
- X
- X
- X
- X Page 7 (printed 5/14/90)
- X
- X
- X
- X
- X
- X
- X PSF(1) UNIX System V PSF(1)
- X
- X
- X
- X The underline sequence should be 'innermost' to ensure that
- X the underline follows the exact font width, correct
- X thickness and position.
- X
- X Font numbers are unique to a printer. Font 4 on one printer
- X may not be the same as font 4 on a different printer. For a
- X given printer, the font numbers are as specified on the
- X usage menu of psf (generated with "psf --").
- X
- X Any unrecognized escape sequences are ignored.
- X
- X Any filter that can construct the above escape sequences may
- X be used to provide input to psf. The provided pnf and pmf
- X are only two simple examples.
- X
- X If your text editor (such as vi) is able to conveniently
- X insert a ^E character into text, the above sequences could
- X be inserted and you would have "almost a word processor."
- X This is a convenient way to add a bit of class to quick
- X memos.
- X
- X
- X PRINTER SPOOLING
- X If psf has been installed as part of the Xenix or AT&T Unix
- X 3.2 lp spooling system, then psf options may be passed in
- X the lp command line using the -o option for lp :
- X
- X lp -o"-4xh" this.file that.file
- X --------
- X
- X For AT&T Unix systems, the additional options of "banner"
- X and "nobanner" may be passed to the spooler to print or not
- X print a banner page:
- X
- X lp -o"nobanner -4xh" this.file that.file
- X or
- X lp -o"banner -4xh" this.file that.file
- X
- X
- X SEE ALSO
- X pmf pnf psman psnroff psmbox lp lpadmin
- X
- X
- X AUTHOR
- X Tony Field. tony@ajfcal
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Page 8 (printed 5/14/90)
- X
- X
- X
- END_OF_FILE
- if test 15470 -ne `wc -c <'psf.doc'`; then
- echo shar: \"'psf.doc'\" unpacked with wrong size!
- fi
- # end of 'psf.doc'
- fi
- echo shar: End of archive 5 \(of 6\).
- cp /dev/null ark5isdone
- MISSING=""
- for I in 1 2 3 4 5 6 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 6 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
-